#ifndef TEXTBOX_H_
#define TEXTBOX_H_

#define MAX_SIZE 15

#include "../../common/utils/Logger.h"

#include "SDL/SDL.h"
#include "SDL/SDL_image.h"
#include "SDL/SDL_ttf.h"
#include "../WidgetClickeableWithText.h"
#include <string>
#include <iostream>


class Textbox: public WidgetClickeableWithText {
public:
	Textbox(int posX, int posY, Widget *parent);
	virtual ~Textbox();

	void setFocus();
	void unsetFocus();
	bool getFocus() const;
	void cleanInput();
	std::string getInput();

	virtual void handleEvent(Event event);

	virtual void resolve();

private:

	bool inputChanged;
	bool mousePressed;
	bool mouseIsOver;
	bool keyDown;
	bool isChar;
	bool backSpace;
	char tempInput;

	Uint8 keyState;
	bool keyPressed;
	char letra;

};

#endif /* TEXTBOX_H_ */
